const path = require('path')
const SourceMapHandle = require('./plugin/SourceMapHandleV4')
const WOSHandlerAdapter = require('./customHandlerAdapter/wosHandlerAdapter')
const InsertLogBanner = require('./plugin/InsertBannerLogV4')
module.exports = {
  mode: 'production',
  entry: path.join(process.cwd(), 'src/index.js'),
  // experiments: {
  //   outputModule: true,
  // },
  output: {
    filename: 'main-[hash:6].js',
    path: path.resolve(__dirname, 'dist'),
    // module: true,
    // library: {
      // type:'umd',
    // },
  },
  devtool: 'hidden-source-map',
  plugins: [
    new SourceMapHandle({customHandlerAdapter: new WOSHandlerAdapter({
      appId: 'lnjIhGfElMpS',
      secretId: 'z63DKgMphkBTkgbJmVGMVOyc1M2qs6AM',
      bucket: 'wuxianfevoc',
      domainHost: 'wosin20.58corp.com'
    }, 'test_sourcemap_0802')}),
    new InsertLogBanner({
      banner: 'hello world'
    }),
  ]
}
